package com.wicket.okrapp.biz.service.impl;

import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import com.wicket.okrapp.common.util.RedisUtil;

import javax.annotation.Resource;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.wicket.okrapp.base.service.MOmsBizAppBatchService;
import com.wicket.okrapp.base.service.MOmsEvaBatchRelatedSetService;
import com.wicket.okrapp.dal.po.mbg.OmsEvaBatchRelatedSet;
import com.wicket.okrapp.base.service.dto.req.QueryPlanEvaBatchSetDetailReq;
import com.wicket.okrapp.base.service.MOmsBizAppStatusCheckItemService;
import com.wicket.okrapp.dal.po.mbg.OmsBizAppStatusCheckItem;
import com.wicket.okrapp.base.service.dto.req.QueryBizAppCheckItemStatDetailReq;
import com.wicket.okrapp.base.service.MOmsBasicInstanceAssistBehaviorCurrentStepService;
import com.wicket.okrapp.dal.po.mbg.OmsBasicInstanceAssistBehaviorCurrentStep;
import com.wicket.okrapp.base.service.dto.req.QueryBizAppServiceContCurrentBstepDetailReq;
import com.wicket.okrapp.common.exception.Assert;
import com.wicket.okrapp.biz.service.nb.NbStatusData;
import com.wicket.okrapp.biz.service.EvaSystemService;
import com.wicket.okrapp.dal.po.mbg.OmsBizAppBatch;
import com.wicket.okrcomponent.integration.dto.GenerateBatchNameEtcSemanticInstanceComRespDto;
import com.wicket.okrcomponent.integration.dto.GenerateBatchNameEtcSemanticInstanceComReqDto;
import com.wicket.okrcomponent.integration.FwCompTemplateEngineClient;
import com.wicket.okrapp.biz.service.OffStateService;
import com.wicket.okrapp.biz.service.TargetContentService;
import com.wicket.okrapp.base.service.MOmsEvaluationObjectTargetCycleService;

/**
 * @author ：
 * @date ：
 *
 * 
 * @version 1.0
 */
@Service
public class StatusDataServiceImpl
  implements com.wicket.okrapp.biz.service.StatusDataService {

  @Resource
  private RedisUtil redisUtil;
//@Resource
 //private MCustomFields2Service mCustomFields2Service;
@Resource
  private MOmsBizAppBatchService mOmsBizAppBatchService;
@Resource
  private MOmsEvaBatchRelatedSetService mOmsEvaBatchRelatedSetService;
@Resource
  private MOmsBizAppStatusCheckItemService mOmsBizAppStatusCheckItemService;
@Resource
  private MOmsBasicInstanceAssistBehaviorCurrentStepService mOmsBasicInstanceAssistBehaviorCurrentStepService;
@Resource
  private NbStatusData nbStatusData;
@Resource
  private EvaSystemService evaSystemService;
@Resource
  private FwCompTemplateEngineClient fwCompTemplateEngineClient;
@Resource
  private OffStateService offStateService;
@Resource
  private TargetContentService targetContentService;
@Resource
  private MOmsEvaluationObjectTargetCycleService mOmsEvaluationObjectTargetCycleService;
/**
   * D3执行统一管理批次数据处理(公共)[5019]
   * gen by moon at 2/19/2023, 4:44:36 PM
   */
  @Trace(operationName = "D3执行统一管理批次数据处理(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ImplementUnifiedMgtBatchHandleComRespDto implementUnifiedMgtBatchHandleCom(ImplementUnifiedMgtBatchHandleComReqDto reqDto){
    
      
      String string_1 =null;
//virtualUsage D2生成批次名称等语义内容服务(公共)  27416
      GenerateBatchNameEtcSemanticInstanceComRespDto generateBatchNameEtcSemanticInstanceComRespDto = null;
    GenerateBatchNameEtcSemanticInstanceComReqDto generateBatchNameEtcSemanticInstanceComReqDto=new GenerateBatchNameEtcSemanticInstanceComReqDto();
  generateBatchNameEtcSemanticInstanceComReqDto.setTemplateSemanticEngineCode("GENERATE_EVA_TEMP_BATCH_NAME");//CUSTOM_CONVENTION//sourceId:614590_1_27416
if(reqDto!=null){
      generateBatchNameEtcSemanticInstanceComReqDto.setObjectName(reqDto.getTargetContentName());//SimpleFieldAssign//sourceId:614595_1_27416
    }
  
    /*D2生成批次名称等语义内容服务(公共)[5090]   */
    Assert.isNull(generateBatchNameEtcSemanticInstanceComReqDto.getTemplateSemanticEngineCode(),"D3执行统一管理批次数据处理(公共)-D2生成批次名称等语义内容服务(公共)-模板引擎标识不能为空",false);
Assert.isNull(generateBatchNameEtcSemanticInstanceComReqDto.getObjectName(),"D3执行统一管理批次数据处理(公共)-D2生成批次名称等语义内容服务(公共)-对象名称不能为空",false);
      generateBatchNameEtcSemanticInstanceComRespDto = fwCompTemplateEngineClient.generateBatchNameEtcSemanticInstanceCom(generateBatchNameEtcSemanticInstanceComReqDto).getData();
      
      
      
//virtualUsage 3-13-01新增无约定标识业务应用批次  20260
      String string = null;
    if(generateBatchNameEtcSemanticInstanceComRespDto !=null){
    OmsBizAppBatch omsBizAppBatch=new OmsBizAppBatch();
  if(reqDto!=null){
      omsBizAppBatch.setBatchCode(reqDto.getBatchCode());//SimpleFieldAssign//sourceId:393839_1_20260
omsBizAppBatch.setPurposeTypeCode(reqDto.getPurposeTypeCode());//SimpleFieldAssign//sourceId:393842_1_20260
omsBizAppBatch.setAscriptionObjectId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:393843_1_20260
omsBizAppBatch.setIsFirst(reqDto.getIsFirst());//SimpleFieldAssign//sourceId:393844_1_20260
    }
if(generateBatchNameEtcSemanticInstanceComRespDto!=null){
      omsBizAppBatch.setBatchName(generateBatchNameEtcSemanticInstanceComRespDto.getObjectName());//SimpleFieldAssign//sourceId:393840_1_20260
    }
  
    /*3-13-01新增无约定标识业务应用批次[5022]   */
    Assert.isNull(omsBizAppBatch.getBatchCode(),"D3执行统一管理批次数据处理(公共)-3-13-01新增无约定标识业务应用批次-批次标识不能为空",false);
Assert.isNull(omsBizAppBatch.getBatchName(),"D3执行统一管理批次数据处理(公共)-3-13-01新增无约定标识业务应用批次-批次名称不能为空",false);
Assert.isNull(omsBizAppBatch.getPurposeTypeCode(),"D3执行统一管理批次数据处理(公共)-3-13-01新增无约定标识业务应用批次-用途类型编码不能为空",false);
Assert.isNull(omsBizAppBatch.getAscriptionObjectId(),"D3执行统一管理批次数据处理(公共)-3-13-01新增无约定标识业务应用批次-归属对象ID不能为空",false);
Assert.isNull(omsBizAppBatch.getIsFirst(),"D3执行统一管理批次数据处理(公共)-3-13-01新增无约定标识业务应用批次-是否首次批次不能为空",false);
      string = mOmsBizAppBatchService.addNoCodeBizAppBatch(omsBizAppBatch);
      
      
      string_1 = string;
           }
//virtualUsage 3-3-09-03查询评价模板批次设置详情  20233
      OmsEvaBatchRelatedSet omsEvaBatchRelatedSet = null;
    QueryPlanEvaBatchSetDetailReq queryPlanEvaBatchSetDetailReq=new QueryPlanEvaBatchSetDetailReq();
  if(reqDto!=null){
      queryPlanEvaBatchSetDetailReq.setBatchSetId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:393744_1_20233
queryPlanEvaBatchSetDetailReq.setBatchSetObjectType(reqDto.getPurposeTypeCode());//SimpleFieldAssign//sourceId:392747_1_20233
    }
  
    /*3-3-09-03查询评价模板批次设置详情[2998]   */
    Assert.isNull(queryPlanEvaBatchSetDetailReq.getBatchSetId(),"D3执行统一管理批次数据处理(公共)-3-3-09-03查询评价模板批次设置详情-批次设置对象ID不能为空",false);
Assert.isNull(queryPlanEvaBatchSetDetailReq.getBatchSetObjectType(),"D3执行统一管理批次数据处理(公共)-3-3-09-03查询评价模板批次设置详情-批次设置对象类型不能为空",false);
      omsEvaBatchRelatedSet = mOmsEvaBatchRelatedSetService.queryPlanEvaBatchSetDetail(queryPlanEvaBatchSetDetailReq);
      
      
      
//virtualUsage 3-3-09-03修改评价模板批次设置  20234
      boolean bOOLEAN ;
    if(omsEvaBatchRelatedSet !=null){
          OmsEvaBatchRelatedSet omsEvaBatchRelatedSet_2=new OmsEvaBatchRelatedSet();
  omsEvaBatchRelatedSet_2.setManageLockStatus("UNLOCK");//sourceId:392761_1_20234
omsEvaBatchRelatedSet_2.setReasonOfManageLock("---");//NULL//sourceId:392768_1_20234
omsEvaBatchRelatedSet_2.setUsingLockStatus("AUTO_LOCK");//sourceId:392762_1_20234
omsEvaBatchRelatedSet_2.setReasonOfUsingLock("规划正在管理维护中，暂停使用，请耐心等待~~");//CUSTOM_CONVENTION//sourceId:392769_1_20234
omsEvaBatchRelatedSet_2.setIsUnifiedMgt("TRUE");//sourceId:392763_1_20234
omsEvaBatchRelatedSet_2.setSetCompleteStatus("FALSE");//sourceId:614816_1_20234
omsEvaBatchRelatedSet_2.setBatchProcessProgress(Long.valueOf(-1));//CUSTOM_CONVENTION//sourceId:392766_1_20234
omsEvaBatchRelatedSet_2.setDelBatchIsDone("FALSE");//sourceId:392767_1_20234
omsEvaBatchRelatedSet_2.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:392764_1_20234
omsEvaBatchRelatedSet_2.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:392765_1_20234
if(omsEvaBatchRelatedSet!=null){
      omsEvaBatchRelatedSet_2.setBatchRelatedSetId(omsEvaBatchRelatedSet.getBatchRelatedSetId());//SimpleFieldAssign//sourceId:392760_1_20234
    }
if(reqDto!=null){
      omsEvaBatchRelatedSet_2.setCurrentManageObjectType(reqDto.getCurrentManageObjectType());//SimpleFieldAssign//sourceId:392770_1_20234
    }
  
    /*3-3-09-03修改评价模板批次设置[3034]   */
    Assert.isNull(omsEvaBatchRelatedSet_2.getBatchRelatedSetId(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-批次相关设置ID不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getCurrentManageObjectType(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-当前管理对象类型不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getManageLockStatus(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-管理锁定状态不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getReasonOfManageLock(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-管理锁定原因不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getUsingLockStatus(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-使用锁定状态不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getReasonOfUsingLock(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-使用锁定原因不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getIsUnifiedMgt(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-是否统一管理不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getSetCompleteStatus(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-设置完成状态不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getBatchProcessProgress(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-批次处理进度不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getDelBatchIsDone(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-批次处理是否完成不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getOperationInductionId(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-操作人就职记录ID不能为空",false);
Assert.isNull(omsEvaBatchRelatedSet_2.getOperateTime(),"D3执行统一管理批次数据处理(公共)-3-3-09-03修改评价模板批次设置-操作时间不能为空",false);
      bOOLEAN = mOmsEvaBatchRelatedSetService.updatePlanEvaBatchSet(omsEvaBatchRelatedSet_2);
      
      
      
           }
//virtualUsage 3-11-04查业务应用校验项状态详情  20235
      OmsBizAppStatusCheckItem omsBizAppStatusCheckItem = null;
    QueryBizAppCheckItemStatDetailReq queryBizAppCheckItemStatDetailReq=new QueryBizAppCheckItemStatDetailReq();
  queryBizAppCheckItemStatDetailReq.setObjectTypeCode("OMS_EVALUATION_OBJECT_TARGET_CYCLE");//sourceId:392730_1_20235
if(reqDto!=null){
      queryBizAppCheckItemStatDetailReq.setCheckItemCode(reqDto.getCheckItemCode());//SimpleFieldAssign//sourceId:392733_1_20235
queryBizAppCheckItemStatDetailReq.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:392731_1_20235
    }
  
    /*3-11-04查业务应用校验项状态详情[2661]   */
    Assert.isNull(queryBizAppCheckItemStatDetailReq.getCheckItemCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查业务应用校验项状态详情-检查项标识不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq.getEntityId(),"D3执行统一管理批次数据处理(公共)-3-11-04查业务应用校验项状态详情-内容对象实例ID不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq.getObjectTypeCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查业务应用校验项状态详情-内容对象类型编码不能为空",false);
      omsBizAppStatusCheckItem = mOmsBizAppStatusCheckItemService.queryBizAppCheckItemStatDetail(queryBizAppCheckItemStatDetailReq);
      
      
      
//virtualUsage 3-11-04修改业务应用校验项状态  20237
      boolean bOOLEAN_1 ;
    if(omsBizAppStatusCheckItem !=null){
          OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_2=new OmsBizAppStatusCheckItem();
  omsBizAppStatusCheckItem_2.setIsComplete("FALSE");//sourceId:392738_1_20237
if(omsBizAppStatusCheckItem!=null){
      omsBizAppStatusCheckItem_2.setStatusCheckItemId(omsBizAppStatusCheckItem.getStatusCheckItemId());//SimpleFieldAssign//sourceId:392737_1_20237
    }
  
    /*3-11-04修改业务应用校验项状态[2660]   */
    Assert.isNull(omsBizAppStatusCheckItem_2.getStatusCheckItemId(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态-状态校验项ID不能为空",false);
Assert.isNull(omsBizAppStatusCheckItem_2.getIsComplete(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态-是否已完成不能为空",false);
      bOOLEAN_1 = mOmsBizAppStatusCheckItemService.updateBizAppCheckItemStat(omsBizAppStatusCheckItem_2);
      
      
      
           }
//virtualUsage 3-13-06查业务应用服务内容当前行为步骤  20238
      OmsBasicInstanceAssistBehaviorCurrentStep omsBasicInstanceAssistBehaviorCurrentStep = null;
    QueryBizAppServiceContCurrentBstepDetailReq queryBizAppServiceContCurrentBstepDetailReq=new QueryBizAppServiceContCurrentBstepDetailReq();
  queryBizAppServiceContCurrentBstepDetailReq.setStepObj("OMS_EVALUATION_OBJECT_TARGET_CYCLE");//sourceId:392739_1_20238
if(reqDto!=null){
      queryBizAppServiceContCurrentBstepDetailReq.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:392740_1_20238
    }
  
    /*3-13-06查业务应用服务内容当前行为步骤[2952]   */
    Assert.isNull(queryBizAppServiceContCurrentBstepDetailReq.getStepObj(),"D3执行统一管理批次数据处理(公共)-3-13-06查业务应用服务内容当前行为步骤-步骤使用对象表不能为空",false);
Assert.isNull(queryBizAppServiceContCurrentBstepDetailReq.getEntityId(),"D3执行统一管理批次数据处理(公共)-3-13-06查业务应用服务内容当前行为步骤-步骤内容实例ID不能为空",false);
      omsBasicInstanceAssistBehaviorCurrentStep = mOmsBasicInstanceAssistBehaviorCurrentStepService.queryBizAppServiceContCurrentBstepDetail(queryBizAppServiceContCurrentBstepDetailReq);
      Assert.isTrue(omsBasicInstanceAssistBehaviorCurrentStep== null||  omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId() ==null,"找不到数据，系统异常",false);
      
      
if((reqDto!= null&&  reqDto.getPurposeTypeCode() !=null && reqDto.getPurposeTypeCode().equals("MID_DIV_MGT"))) {
        //if(D3执行统一管理批次数据处理(公共).用途类型编码 等于 中层分工管理)  20246
        
ImplementAnalysisMidStepRoomComRespDto implementAnalysisMidStepRoomComRespDto = null;
    ImplementAnalysisMidStepRoomComReqDto implementAnalysisMidStepRoomComReqDto=new ImplementAnalysisMidStepRoomComReqDto();
  if(reqDto!=null){
      implementAnalysisMidStepRoomComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:393763_1_20247
implementAnalysisMidStepRoomComReqDto.setResultAspObjId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:393762_1_20247
    }
  
    /*D3执行分析中层步骤房间(公共)[4636]   */
    Assert.isNull(implementAnalysisMidStepRoomComReqDto.getDeptId(),"D3执行统一管理批次数据处理(公共)-D3执行分析中层步骤房间(公共)-中层一级部门ID不能为空",false);
Assert.isNull(implementAnalysisMidStepRoomComReqDto.getResultAspObjId(),"D3执行统一管理批次数据处理(公共)-D3执行分析中层步骤房间(公共)-评价模板ID不能为空",false);
      implementAnalysisMidStepRoomComRespDto = evaSystemService.implementAnalysisMidStepRoomCom(implementAnalysisMidStepRoomComReqDto);
      
      
      
if((implementAnalysisMidStepRoomComRespDto!= null&& implementAnalysisMidStepRoomComRespDto.getTargetTaskDivRoom() != null &&implementAnalysisMidStepRoomComRespDto!= null&&  implementAnalysisMidStepRoomComRespDto.getTargetTaskDivRoom() !=null && implementAnalysisMidStepRoomComRespDto.getTargetTaskDivRoom().equals("1"))) {
        //if((D3执行分析中层步骤房间(公共).目标任务分工房间 值不等于空  and D3执行分析中层步骤房间(公共).目标任务分工房间 等于 1))  20248
        
boolean bOOLEAN_2 ;
    if(omsBasicInstanceAssistBehaviorCurrentStep !=null){
          OmsBasicInstanceAssistBehaviorCurrentStep omsBasicInstanceAssistBehaviorCurrentStep_2=new OmsBasicInstanceAssistBehaviorCurrentStep();
  omsBasicInstanceAssistBehaviorCurrentStep_2.setStepNameCode("LEAD_TARGET_ARRANGE");//CUSTOM_CONVENTION//sourceId:392745_1_20250
if(omsBasicInstanceAssistBehaviorCurrentStep!=null){
      omsBasicInstanceAssistBehaviorCurrentStep_2.setBehaviorCurrentStepId(omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:392744_1_20250
    }
  
    /*3-13-06修改业务应用服务内容当前行为步骤（牵头房间步骤）[2963]   */
    Assert.isNull(omsBasicInstanceAssistBehaviorCurrentStep_2.getBehaviorCurrentStepId(),"D3执行统一管理批次数据处理(公共)-3-13-06修改业务应用服务内容当前行为步骤（牵头房间步骤）-内容当前行为步骤ID不能为空",false);
Assert.isNull(omsBasicInstanceAssistBehaviorCurrentStep_2.getStepNameCode(),"D3执行统一管理批次数据处理(公共)-3-13-06修改业务应用服务内容当前行为步骤（牵头房间步骤）-步骤编码不能为空",false);
      bOOLEAN_2 = mOmsBasicInstanceAssistBehaviorCurrentStepService.updateBizAppServiceContCurrentBstep(omsBasicInstanceAssistBehaviorCurrentStep_2);
      
      
      
           }
OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_3 = null;
    QueryBizAppCheckItemStatDetailReq queryBizAppCheckItemStatDetailReq_1=new QueryBizAppCheckItemStatDetailReq();
  queryBizAppCheckItemStatDetailReq_1.setCheckItemCode("LEAD_TARGET_TASK_ARRANGE_CHECK_ITEM");//CUSTOM_CONVENTION//sourceId:406566_1_20476
queryBizAppCheckItemStatDetailReq_1.setObjectTypeCode("OMS_EVALUATION_OBJECT_TARGET_CYCLE");//sourceId:406563_1_20476
if(reqDto!=null){
      queryBizAppCheckItemStatDetailReq_1.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:406564_1_20476
    }

    /*3-11-04查中层第一步骤检查项“牵头目标安排”状态[2661]   */
    Assert.isNull(queryBizAppCheckItemStatDetailReq_1.getCheckItemCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查中层第一步骤检查项“牵头目标安排”状态-检查项标识不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq_1.getEntityId(),"D3执行统一管理批次数据处理(公共)-3-11-04查中层第一步骤检查项“牵头目标安排”状态-内容对象实例ID不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq_1.getObjectTypeCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查中层第一步骤检查项“牵头目标安排”状态-内容对象类型编码不能为空",false);
      omsBizAppStatusCheckItem_3 = mOmsBizAppStatusCheckItemService.queryBizAppCheckItemStatDetail(queryBizAppCheckItemStatDetailReq_1);



boolean bOOLEAN_3 ;
    if(omsBizAppStatusCheckItem_3 !=null){
          OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_5=new OmsBizAppStatusCheckItem();
  omsBizAppStatusCheckItem_5.setIsComplete("FALSE");//sourceId:392738_1_20477
if(omsBizAppStatusCheckItem_3!=null){
      omsBizAppStatusCheckItem_5.setStatusCheckItemId(omsBizAppStatusCheckItem_3.getStatusCheckItemId());//SimpleFieldAssign//sourceId:392737_1_20477
    }

    /*3-11-04修改业务应用校验项状态[2660]   */
    Assert.isNull(omsBizAppStatusCheckItem_5.getStatusCheckItemId(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态-状态校验项ID不能为空",false);
Assert.isNull(omsBizAppStatusCheckItem_5.getIsComplete(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态-是否已完成不能为空",false);
      bOOLEAN_3 = mOmsBizAppStatusCheckItemService.updateBizAppCheckItemStat(omsBizAppStatusCheckItem_5);



           }
//processBranchName:正常结束 ,processBranchId:20251
        
      }
else if((implementAnalysisMidStepRoomComRespDto!= null&& implementAnalysisMidStepRoomComRespDto.getTargetTaskDivRoom() == null &&implementAnalysisMidStepRoomComRespDto!= null&& implementAnalysisMidStepRoomComRespDto.getLeadTargetArrangeRoom() != null &&implementAnalysisMidStepRoomComRespDto!= null&&  implementAnalysisMidStepRoomComRespDto.getLeadTargetArrangeRoom() !=null && implementAnalysisMidStepRoomComRespDto.getLeadTargetArrangeRoom().equals("1"))){
       //elseif((D3执行分析中层步骤房间(公共).目标任务分工房间 值等于空  and D3执行分析中层步骤房间(公共).牵头目标安排房间 值不等于空  and D3执行分析中层步骤房间(公共).牵头目标安排房间 等于 1))  20249
      
boolean bOOLEAN_4 ;
    if(omsBasicInstanceAssistBehaviorCurrentStep !=null){
          OmsBasicInstanceAssistBehaviorCurrentStep omsBasicInstanceAssistBehaviorCurrentStep_3=new OmsBasicInstanceAssistBehaviorCurrentStep();
  omsBasicInstanceAssistBehaviorCurrentStep_3.setStepNameCode("EXECUTE_TARGET_ARRANGE");//CUSTOM_CONVENTION//sourceId:393771_1_20252
if(omsBasicInstanceAssistBehaviorCurrentStep!=null){
      omsBasicInstanceAssistBehaviorCurrentStep_3.setBehaviorCurrentStepId(omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:393770_1_20252
    }
  
    /*3-13-06修改业务应用服务内容当前行为步骤（执行房间步骤）[2963]   */
    Assert.isNull(omsBasicInstanceAssistBehaviorCurrentStep_3.getBehaviorCurrentStepId(),"D3执行统一管理批次数据处理(公共)-3-13-06修改业务应用服务内容当前行为步骤（执行房间步骤）-内容当前行为步骤ID不能为空",false);
Assert.isNull(omsBasicInstanceAssistBehaviorCurrentStep_3.getStepNameCode(),"D3执行统一管理批次数据处理(公共)-3-13-06修改业务应用服务内容当前行为步骤（执行房间步骤）-步骤编码不能为空",false);
      bOOLEAN_4 = mOmsBasicInstanceAssistBehaviorCurrentStepService.updateBizAppServiceContCurrentBstep(omsBasicInstanceAssistBehaviorCurrentStep_3);



           }
OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_6 = null;
    QueryBizAppCheckItemStatDetailReq queryBizAppCheckItemStatDetailReq_2=new QueryBizAppCheckItemStatDetailReq();
  queryBizAppCheckItemStatDetailReq_2.setCheckItemCode("PERFORM_TARGET_TASK_ARRANGE_CHECK_ITEM");//CUSTOM_CONVENTION//sourceId:406580_1_20480
queryBizAppCheckItemStatDetailReq_2.setObjectTypeCode("OMS_EVALUATION_OBJECT_TARGET_CYCLE");//sourceId:406577_1_20480
if(reqDto!=null){
      queryBizAppCheckItemStatDetailReq_2.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:406578_1_20480
    }

    /*3-11-04查中层第二步骤检查项“执行目标任务安排”状态[2661]   */
    Assert.isNull(queryBizAppCheckItemStatDetailReq_2.getCheckItemCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查中层第二步骤检查项“执行目标任务安排”状态-检查项标识不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq_2.getEntityId(),"D3执行统一管理批次数据处理(公共)-3-11-04查中层第二步骤检查项“执行目标任务安排”状态-内容对象实例ID不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq_2.getObjectTypeCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查中层第二步骤检查项“执行目标任务安排”状态-内容对象类型编码不能为空",false);
      omsBizAppStatusCheckItem_6 = mOmsBizAppStatusCheckItemService.queryBizAppCheckItemStatDetail(queryBizAppCheckItemStatDetailReq_2);



ImplementAnalyseMidExeTargetDivItemComRespDto implementAnalyseMidExeTargetDivItemComRespDto = null;
    ImplementAnalyseMidExeTargetDivItemComReqDto implementAnalyseMidExeTargetDivItemComReqDto=new ImplementAnalyseMidExeTargetDivItemComReqDto();
  if(reqDto!=null){
      implementAnalyseMidExeTargetDivItemComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:690824_1_30852
implementAnalyseMidExeTargetDivItemComReqDto.setEvaluationTemplateId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:690825_1_30852
    }

    /*D3执行分析中层执行目标安排检查项状态(公共)[5957]   */
    Assert.isNull(implementAnalyseMidExeTargetDivItemComReqDto.getDeptId(),"D3执行统一管理批次数据处理(公共)-D3执行分析中层执行目标安排检查项状态(公共)-部门ID不能为空",false);
Assert.isNull(implementAnalyseMidExeTargetDivItemComReqDto.getEvaluationTemplateId(),"D3执行统一管理批次数据处理(公共)-D3执行分析中层执行目标安排检查项状态(公共)-冗余评价模板ID不能为空",false);
      implementAnalyseMidExeTargetDivItemComRespDto = offStateService.implementAnalyseMidExeTargetDivItemCom(implementAnalyseMidExeTargetDivItemComReqDto);



boolean bOOLEAN_5 ;
    if(omsBizAppStatusCheckItem_6 !=null&&implementAnalyseMidExeTargetDivItemComRespDto !=null){
          OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_8=new OmsBizAppStatusCheckItem();
if(omsBizAppStatusCheckItem_6!=null){
      omsBizAppStatusCheckItem_8.setStatusCheckItemId(omsBizAppStatusCheckItem_6.getStatusCheckItemId());//SimpleFieldAssign//sourceId:690846_1_30853
    }
if(implementAnalyseMidExeTargetDivItemComRespDto!=null){
      omsBizAppStatusCheckItem_8.setIsComplete(implementAnalyseMidExeTargetDivItemComRespDto.getIsComplete());//SimpleFieldAssign//sourceId:690847_1_30853
    }

    /*3-11-04修改业务应用校验项状态（中层执行目标安排）[2660]   */
    Assert.isNull(omsBizAppStatusCheckItem_8.getStatusCheckItemId(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态（中层执行目标安排）-状态校验项ID不能为空",false);
Assert.isNull(omsBizAppStatusCheckItem_8.getIsComplete(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态（中层执行目标安排）-是否已完成不能为空",false);
      bOOLEAN_5 = mOmsBizAppStatusCheckItemService.updateBizAppCheckItemStat(omsBizAppStatusCheckItem_8);
      
      
      
           }
//processBranchName:正常结束 ,processBranchId:20253
        
    }
      }
else if((reqDto!= null&&  reqDto.getPurposeTypeCode() !=null && reqDto.getPurposeTypeCode().equals("BASIC_DIV_MGT"))){
       //elseif(D3执行统一管理批次数据处理(公共).用途类型编码 等于 基层分工管理)  20254
      
boolean bOOLEAN_6 ;
    if(omsBasicInstanceAssistBehaviorCurrentStep !=null){
          OmsBasicInstanceAssistBehaviorCurrentStep omsBasicInstanceAssistBehaviorCurrentStep_4=new OmsBasicInstanceAssistBehaviorCurrentStep();
  omsBasicInstanceAssistBehaviorCurrentStep_4.setStepNameCode("EXECUTE_TARGET_ARRANGE");//CUSTOM_CONVENTION//sourceId:393773_1_20255
if(omsBasicInstanceAssistBehaviorCurrentStep!=null){
      omsBasicInstanceAssistBehaviorCurrentStep_4.setBehaviorCurrentStepId(omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:393772_1_20255
    }
  
    /*3-13-06修改业务应用服务内容当前行为步骤（基层当前步骤）[2963]   */
    Assert.isNull(omsBasicInstanceAssistBehaviorCurrentStep_4.getBehaviorCurrentStepId(),"D3执行统一管理批次数据处理(公共)-3-13-06修改业务应用服务内容当前行为步骤（基层当前步骤）-内容当前行为步骤ID不能为空",false);
Assert.isNull(omsBasicInstanceAssistBehaviorCurrentStep_4.getStepNameCode(),"D3执行统一管理批次数据处理(公共)-3-13-06修改业务应用服务内容当前行为步骤（基层当前步骤）-步骤编码不能为空",false);
      bOOLEAN_6 = mOmsBasicInstanceAssistBehaviorCurrentStepService.updateBizAppServiceContCurrentBstep(omsBasicInstanceAssistBehaviorCurrentStep_4);



           }
OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_9 = null;
    QueryBizAppCheckItemStatDetailReq queryBizAppCheckItemStatDetailReq_3=new QueryBizAppCheckItemStatDetailReq();
  queryBizAppCheckItemStatDetailReq_3.setCheckItemCode("PERFORM_TARGET_TASK_ARRANGE_CHECK_ITEM");//CUSTOM_CONVENTION//sourceId:406540_1_20466
queryBizAppCheckItemStatDetailReq_3.setObjectTypeCode("OMS_EVALUATION_OBJECT_TARGET_CYCLE");//sourceId:406537_1_20466
if(reqDto!=null){
      queryBizAppCheckItemStatDetailReq_3.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:406538_1_20466
    }

    /*3-11-04查基层第一步骤检查项状态[2661]   */
    Assert.isNull(queryBizAppCheckItemStatDetailReq_3.getCheckItemCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查基层第一步骤检查项状态-检查项标识不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq_3.getEntityId(),"D3执行统一管理批次数据处理(公共)-3-11-04查基层第一步骤检查项状态-内容对象实例ID不能为空",false);
Assert.isNull(queryBizAppCheckItemStatDetailReq_3.getObjectTypeCode(),"D3执行统一管理批次数据处理(公共)-3-11-04查基层第一步骤检查项状态-内容对象类型编码不能为空",false);
      omsBizAppStatusCheckItem_9 = mOmsBizAppStatusCheckItemService.queryBizAppCheckItemStatDetail(queryBizAppCheckItemStatDetailReq_3);



boolean bOOLEAN_7 ;
    if(omsBizAppStatusCheckItem_9 !=null){
          OmsBizAppStatusCheckItem omsBizAppStatusCheckItem_11=new OmsBizAppStatusCheckItem();
  omsBizAppStatusCheckItem_11.setIsComplete("FALSE");//sourceId:392738_1_20467
if(omsBizAppStatusCheckItem_9!=null){
      omsBizAppStatusCheckItem_11.setStatusCheckItemId(omsBizAppStatusCheckItem_9.getStatusCheckItemId());//SimpleFieldAssign//sourceId:392737_1_20467
    }

    /*3-11-04修改业务应用校验项状态[2660]   */
    Assert.isNull(omsBizAppStatusCheckItem_11.getStatusCheckItemId(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态-状态校验项ID不能为空",false);
Assert.isNull(omsBizAppStatusCheckItem_11.getIsComplete(),"D3执行统一管理批次数据处理(公共)-3-11-04修改业务应用校验项状态-是否已完成不能为空",false);
      bOOLEAN_7 = mOmsBizAppStatusCheckItemService.updateBizAppCheckItemStat(omsBizAppStatusCheckItem_11);
      
      
      
           }
//processBranchName:正常结束 ,processBranchId:20256
        
    }
ImplementUnifiedMgtBatchHandleComRespDto retData = new ImplementUnifiedMgtBatchHandleComRespDto();
  if(string_1!=null){
      retData.setBatchId(string_1);//SimpleFieldAssign//sourceId:393950_1
    }
  

  
  
return retData;
  }
/**
   * 111111D3执行统一管理部门步骤状态处理(公共)[5914]
   * gen by moon at 4/23/2023, 11:28:20 AM
   */
  @Trace(operationName = "111111D3执行统一管理部门步骤状态处理(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ImplementUnifiedMgtStepStateEtcdiSposeComRespDto implementUnifiedMgtStepStateEtcdiSposeCom(ImplementUnifiedMgtStepStateEtcdiSposeComReqDto reqDto){


      //virtualUsage 3-13-06查部门当前步骤  30018
      OmsBasicInstanceAssistBehaviorCurrentStep omsBasicInstanceAssistBehaviorCurrentStep = null;
    QueryBizAppServiceContCurrentBstepDetailReq queryBizAppServiceContCurrentBstepDetailReq=new QueryBizAppServiceContCurrentBstepDetailReq();
  queryBizAppServiceContCurrentBstepDetailReq.setStepObj("OMS_EVALUATION_OBJECT_TARGET_CYCLE");//sourceId:673512_1_30018
if(reqDto!=null){
      queryBizAppServiceContCurrentBstepDetailReq.setEntityId(reqDto.getBatchSetId());//SimpleFieldAssign//sourceId:673513_1_30018
    }

    /*3-13-06查部门当前步骤[2952]   */
    Assert.isNull(queryBizAppServiceContCurrentBstepDetailReq.getStepObj(),"111111D3执行统一管理部门步骤状态处理(公共)-3-13-06查部门当前步骤-步骤使用对象表不能为空",false);
Assert.isNull(queryBizAppServiceContCurrentBstepDetailReq.getEntityId(),"111111D3执行统一管理部门步骤状态处理(公共)-3-13-06查部门当前步骤-步骤内容实例ID不能为空",false);
      omsBasicInstanceAssistBehaviorCurrentStep = mOmsBasicInstanceAssistBehaviorCurrentStepService.queryBizAppServiceContCurrentBstepDetail(queryBizAppServiceContCurrentBstepDetailReq)/*vcase invoke 本地 method 方法调用;*/;
      Assert.isTrue(omsBasicInstanceAssistBehaviorCurrentStep== null||  omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId() ==null,"找不到数据，系统异常",false);


//virtualUsage D3中基层指标层级等分析(含中基层操作场景)  30019
      ImplementMidBasicObjtiveTierAnalyseIsComRespDto implementMidBasicObjtiveTierAnalyseIsComRespDto = null;
    if(omsBasicInstanceAssistBehaviorCurrentStep !=null){
          ImplementMidBasicObjtiveTierAnalyseIsComReqDto implementMidBasicObjtiveTierAnalyseIsComReqDto=new ImplementMidBasicObjtiveTierAnalyseIsComReqDto();
  if(reqDto!=null){
      implementMidBasicObjtiveTierAnalyseIsComReqDto.setBatchSetObjectType(reqDto.getBatchSetObjectType());//SimpleFieldAssign//sourceId:673476_1_30019
    }
if(omsBasicInstanceAssistBehaviorCurrentStep!=null){
      implementMidBasicObjtiveTierAnalyseIsComReqDto.setStepNameCode(omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode());//SimpleFieldAssign//sourceId:673477_1_30019
    }

    /*D3中基层指标层级等分析(含中基层操作场景)[5916]   */
    Assert.isNull(implementMidBasicObjtiveTierAnalyseIsComReqDto.getBatchSetObjectType(),"111111D3执行统一管理部门步骤状态处理(公共)-D3中基层指标层级等分析(含中基层操作场景)-批次设置对象类型不能为空",false);
Assert.isNull(implementMidBasicObjtiveTierAnalyseIsComReqDto.getStepNameCode(),"111111D3执行统一管理部门步骤状态处理(公共)-D3中基层指标层级等分析(含中基层操作场景)-当前步骤编码不能为空",false);
      implementMidBasicObjtiveTierAnalyseIsComRespDto = targetContentService.implementMidBasicObjtiveTierAnalyseIsCom(implementMidBasicObjtiveTierAnalyseIsComReqDto)/*vcase invoke isSameApp*/;



           }
if((reqDto!= null&&  reqDto.getBatchCurrentStatus() !=null && reqDto.getBatchCurrentStatus().equals("1")||reqDto!= null&&  reqDto.getBatchCurrentStatus() !=null && reqDto.getBatchCurrentStatus().equals("2"))) {
        //if((D3执行统一管理部门步骤状态处理(公共).批次现状 等于 1 or D3执行统一管理部门步骤状态处理(公共).批次现状 等于 2))  29909

ImplementMidBasicStepCheckItemDisposeComRespDto implementMidBasicStepCheckItemDisposeComRespDto = null;
    if(omsBasicInstanceAssistBehaviorCurrentStep !=null){
          ImplementMidBasicStepCheckItemDisposeComReqDto implementMidBasicStepCheckItemDisposeComReqDto=new ImplementMidBasicStepCheckItemDisposeComReqDto();
if(reqDto!=null){
      implementMidBasicStepCheckItemDisposeComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:672627_1_30125
implementMidBasicStepCheckItemDisposeComReqDto.setEvaObjTargetCycleId(reqDto.getBatchSetId());//SimpleFieldAssign//sourceId:672628_1_30125
implementMidBasicStepCheckItemDisposeComReqDto.setBatchSetObjectType(reqDto.getBatchSetObjectType());//SimpleFieldAssign//sourceId:672629_1_30125
implementMidBasicStepCheckItemDisposeComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:672630_1_30125
    }
if(omsBasicInstanceAssistBehaviorCurrentStep!=null){
      implementMidBasicStepCheckItemDisposeComReqDto.setBehaviorCurrentStepId(omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:674273_1_30125
implementMidBasicStepCheckItemDisposeComReqDto.setStepNameCode(omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode());//SimpleFieldAssign//sourceId:674274_1_30125
    }

    /*D3处理部门步骤检查项状态【用于中基层】[5915]   */
    Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getEvaObjTargetCycleId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3处理部门步骤检查项状态【用于中基层】-部门目标ID不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getBatchSetObjectType(),"111111D3执行统一管理部门步骤状态处理(公共)-D3处理部门步骤检查项状态【用于中基层】-批次设置对象类型不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getEvaluationTemplateId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3处理部门步骤检查项状态【用于中基层】-冗余评价模板ID不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getBehaviorCurrentStepId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3处理部门步骤检查项状态【用于中基层】-内容当前行为步骤ID不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getStepNameCode(),"111111D3执行统一管理部门步骤状态处理(公共)-D3处理部门步骤检查项状态【用于中基层】-步骤编码不能为空",false);
      implementMidBasicStepCheckItemDisposeComRespDto = offStateService.implementMidBasicStepCheckItemDisposeCom(implementMidBasicStepCheckItemDisposeComReqDto)/*vcase invoke isSameApp*/;



           }
if((reqDto!= null&&  reqDto.getMgtType() !=null && reqDto.getMgtType().equals("ROLLBACK_ADJUST"))) {
        //if(D3执行统一管理部门步骤状态处理(公共).管理类型 等于 回退操作流程)  29917

ImplementDoubleLoopMidBasicEvaTempMgtLockUpComRespDto implementDoubleLoopMidBasicEvaTempMgtLockUpComRespDto = null;
    ImplementDoubleLoopMidBasicEvaTempMgtLockUpComReqDto implementDoubleLoopMidBasicEvaTempMgtLockUpComReqDto=new ImplementDoubleLoopMidBasicEvaTempMgtLockUpComReqDto();


    /*D3打开管理锁定状态等(双循环)[5802]   */

      implementDoubleLoopMidBasicEvaTempMgtLockUpComRespDto = targetContentService.implementDoubleLoopMidBasicEvaTempMgtLockUpCom(implementDoubleLoopMidBasicEvaTempMgtLockUpComReqDto)/*vcase invoke isSameApp*/;



if((omsBasicInstanceAssistBehaviorCurrentStep!= null&&  omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode() !=null && omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode().equals("TARGET_TASK_DIV")||omsBasicInstanceAssistBehaviorCurrentStep!= null&&  omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode() !=null && omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode().equals("ACHIEVE_ARRANGE")||omsBasicInstanceAssistBehaviorCurrentStep!= null&&  omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode() !=null && omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode().equals("EXECUTE_TARGET_ARRANGE"))&&(reqDto!= null&&  reqDto.getBatchSetObjectType() !=null && reqDto.getBatchSetObjectType().equals("MID_DIV_MGT"))) {
        //if((3-13-06查部门当前步骤.步骤编码 等于 目标任务分工 or 3-13-06查部门当前步骤.步骤编码 等于 完成安排 or 3-13-06查部门当前步骤.步骤编码 等于 执行目标安排) and D3执行统一管理部门步骤状态处理(公共).批次设置对象类型 等于 中层分工管理)  29956

ImplementTopMidBasicRollbackDisposeComRespDto implementTopMidBasicRollbackDisposeComRespDto = null;
    if(implementMidBasicObjtiveTierAnalyseIsComRespDto !=null&&implementMidBasicStepCheckItemDisposeComRespDto !=null){
          ImplementTopMidBasicRollbackDisposeComReqDto implementTopMidBasicRollbackDisposeComReqDto=new ImplementTopMidBasicRollbackDisposeComReqDto();
  if(implementMidBasicObjtiveTierAnalyseIsComRespDto!=null){
      implementTopMidBasicRollbackDisposeComReqDto.setBatchOperateScene(implementMidBasicObjtiveTierAnalyseIsComRespDto.getBatchOperateScene());//SimpleFieldAssign//sourceId:673494_1_29957
    }
if(reqDto!=null){
      implementTopMidBasicRollbackDisposeComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:673495_1_29957
implementTopMidBasicRollbackDisposeComReqDto.setTargetId(reqDto.getTargetId());//SimpleFieldAssign//sourceId:673498_1_29957
implementTopMidBasicRollbackDisposeComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:673497_1_29957
    }
if(implementMidBasicStepCheckItemDisposeComRespDto!=null){
      implementTopMidBasicRollbackDisposeComReqDto.setStepRoomValue(implementMidBasicStepCheckItemDisposeComRespDto.getStepRoomValue());//SimpleFieldAssign//sourceId:673499_1_29957
    }

    /*D3执行高中基层回退处理(公共)[5748]   */
    Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto.getBatchOperateScene(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-高/中/基层操作场景不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto.getDeptId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-部门ID不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto.getTargetId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-目标ID不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto.getEvaluationTemplateId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-冗余评价模板ID不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto.getStepRoomValue(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-进入步骤房间值不能为空",false);
      implementTopMidBasicRollbackDisposeComRespDto = targetContentService.implementTopMidBasicRollbackDisposeCom(implementTopMidBasicRollbackDisposeComReqDto)/*vcase invoke isSameApp*/;



           }
      }
else if((omsBasicInstanceAssistBehaviorCurrentStep!= null&&  omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode() !=null && omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode().equals("ACHIEVE_ARRANGE")||omsBasicInstanceAssistBehaviorCurrentStep!= null&&  omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode() !=null && omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode().equals("TARGET_TASK_DIV"))&&(reqDto!= null&&  reqDto.getBatchSetObjectType() !=null && reqDto.getBatchSetObjectType().equals("BASIC_DIV_MGT"))){
       //elseif((3-13-06查部门当前步骤.步骤编码 等于 完成安排 or 3-13-06查部门当前步骤.步骤编码 等于 目标任务分工) and D3执行统一管理部门步骤状态处理(公共).批次设置对象类型 等于 基层分工管理)  30072

ImplementTopMidBasicRollbackDisposeComRespDto implementTopMidBasicRollbackDisposeComRespDto_1 = null;
    if(implementMidBasicObjtiveTierAnalyseIsComRespDto !=null&&implementMidBasicStepCheckItemDisposeComRespDto !=null){
          ImplementTopMidBasicRollbackDisposeComReqDto implementTopMidBasicRollbackDisposeComReqDto_1=new ImplementTopMidBasicRollbackDisposeComReqDto();
  if(implementMidBasicObjtiveTierAnalyseIsComRespDto!=null){
      implementTopMidBasicRollbackDisposeComReqDto_1.setBatchOperateScene(implementMidBasicObjtiveTierAnalyseIsComRespDto.getBatchOperateScene());//SimpleFieldAssign//sourceId:673494_1_30073
    }
if(reqDto!=null){
      implementTopMidBasicRollbackDisposeComReqDto_1.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:673495_1_30073
implementTopMidBasicRollbackDisposeComReqDto_1.setTargetId(reqDto.getTargetId());//SimpleFieldAssign//sourceId:673498_1_30073
implementTopMidBasicRollbackDisposeComReqDto_1.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:673497_1_30073
    }
if(implementMidBasicStepCheckItemDisposeComRespDto!=null){
      implementTopMidBasicRollbackDisposeComReqDto_1.setStepRoomValue(implementMidBasicStepCheckItemDisposeComRespDto.getStepRoomValue());//SimpleFieldAssign//sourceId:673499_1_30073
    }

    /*D3执行高中基层回退处理(公共)[5748]   */
    Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto_1.getBatchOperateScene(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-高/中/基层操作场景不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto_1.getDeptId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-部门ID不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto_1.getTargetId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-目标ID不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto_1.getEvaluationTemplateId(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-冗余评价模板ID不能为空",false);
Assert.isNull(implementTopMidBasicRollbackDisposeComReqDto_1.getStepRoomValue(),"111111D3执行统一管理部门步骤状态处理(公共)-D3执行高中基层回退处理(公共)-进入步骤房间值不能为空",false);
      implementTopMidBasicRollbackDisposeComRespDto_1 = targetContentService.implementTopMidBasicRollbackDisposeCom(implementTopMidBasicRollbackDisposeComReqDto_1)/*vcase invoke isSameApp*/;



           }
           }
      }
      }
ImplementUnifiedMgtStepStateEtcdiSposeComRespDto retData = new ImplementUnifiedMgtStepStateEtcdiSposeComRespDto();





return retData;
  }
/**
   * D3执行中基层部门步骤检查项状态处理(公共)[6325]
   * gen by moon at 4/20/2023, 1:34:03 AM
   */
  @Trace(operationName = "D3执行中基层部门步骤检查项状态处理(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ImplementMidBasicDeptStepAndCheckItemStateDisposeComRespDto implementMidBasicDeptStepAndCheckItemStateDisposeCom(ImplementMidBasicDeptStepAndCheckItemStateDisposeComReqDto reqDto){


      //步骤0: M3执行接收字段入参（特殊方法） - implementAcceptField
     //ModelCode: receptionService
        ImplementAcceptFieldRespDto receptionServiceRes = null;
    ImplementAcceptFieldReqDto receptionServiceReq=new ImplementAcceptFieldReqDto();
  if(reqDto!=null){
      receptionServiceReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:843973_1
receptionServiceReq.setBatchSetId(reqDto.getBatchSetId());//SimpleFieldAssign//sourceId:843972_1
receptionServiceReq.setBatchSetObjectType(reqDto.getBatchSetObjectType());//SimpleFieldAssign//sourceId:843971_1
receptionServiceReq.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:843974_1
    }

    /*M3执行接收字段入参（特殊方法）[6100]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq.getBatchSetId(),"D3执行中基层部门步骤检查项状态处理(公共)-M3执行接收字段入参（特殊方法）-批次设置对象ID不能为空",false);
Assert.isNull(receptionServiceReq.getBatchSetObjectType(),"D3执行中基层部门步骤检查项状态处理(公共)-M3执行接收字段入参（特殊方法）-批次设置对象类型不能为空",false);
Assert.isNull(receptionServiceReq.getEvaluationTemplateId(),"D3执行中基层部门步骤检查项状态处理(公共)-M3执行接收字段入参（特殊方法）-冗余评价模板ID不能为空",false);
      receptionServiceRes = nbStatusData.implementAcceptField(receptionServiceReq);




//步骤1: 3-13-06查业务应用服务内容当前行为步骤 - queryBizAppServiceContCurrentBstepDetail
     OmsBasicInstanceAssistBehaviorCurrentStep omsBasicInstanceAssistBehaviorCurrentStep = null;
    QueryBizAppServiceContCurrentBstepDetailReq queryBizAppServiceContCurrentBstepDetailReq=new QueryBizAppServiceContCurrentBstepDetailReq();
  if(reqDto!=null){
      queryBizAppServiceContCurrentBstepDetailReq.setEntityId(reqDto.getBatchSetId());//SimpleFieldAssign//sourceId:843950_1
    }

    /*3-13-06查部门主体当前步骤[2952]   */
    Assert.isNull(queryBizAppServiceContCurrentBstepDetailReq.getEntityId(),"D3执行中基层部门步骤检查项状态处理(公共)-3-13-06查部门主体当前步骤-步骤内容实例ID不能为空",false);
      omsBasicInstanceAssistBehaviorCurrentStep = mOmsBasicInstanceAssistBehaviorCurrentStepService.queryBizAppServiceContCurrentBstepDetail(queryBizAppServiceContCurrentBstepDetailReq)/*vcase invoke 本地 method 方法调用;*/;




//步骤2: D3执行中基层步骤检查项处理(公共) - implementMidBasicStepCheckItemDisposeCom
     ImplementMidBasicStepCheckItemDisposeComRespDto implementMidBasicStepCheckItemDisposeComRespDto = null;
    if(omsBasicInstanceAssistBehaviorCurrentStep !=null){
          ImplementMidBasicStepCheckItemDisposeComReqDto implementMidBasicStepCheckItemDisposeComReqDto=new ImplementMidBasicStepCheckItemDisposeComReqDto();
  if(reqDto!=null){
      implementMidBasicStepCheckItemDisposeComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:843955_1
implementMidBasicStepCheckItemDisposeComReqDto.setEvaObjTargetCycleId(reqDto.getBatchSetId());//SimpleFieldAssign//sourceId:843970_1
implementMidBasicStepCheckItemDisposeComReqDto.setBatchSetObjectType(reqDto.getBatchSetObjectType());//SimpleFieldAssign//sourceId:843954_1
implementMidBasicStepCheckItemDisposeComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:843956_1
    }
if(omsBasicInstanceAssistBehaviorCurrentStep!=null){
      implementMidBasicStepCheckItemDisposeComReqDto.setBehaviorCurrentStepId(omsBasicInstanceAssistBehaviorCurrentStep.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:843960_1
implementMidBasicStepCheckItemDisposeComReqDto.setStepNameCode(omsBasicInstanceAssistBehaviorCurrentStep.getStepNameCode());//SimpleFieldAssign//sourceId:843961_1
    }

    /*D3执行中基层步骤检查项处理(公共)[5915]   */
    Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getEvaObjTargetCycleId(),"D3执行中基层部门步骤检查项状态处理(公共)-D3执行中基层步骤检查项处理(公共)-部门根节点ID不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getBatchSetObjectType(),"D3执行中基层部门步骤检查项状态处理(公共)-D3执行中基层步骤检查项处理(公共)-批次设置对象类型不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getEvaluationTemplateId(),"D3执行中基层部门步骤检查项状态处理(公共)-D3执行中基层步骤检查项处理(公共)-冗余评价模板ID不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getBehaviorCurrentStepId(),"D3执行中基层部门步骤检查项状态处理(公共)-D3执行中基层步骤检查项处理(公共)-内容当前行为步骤ID不能为空",false);
Assert.isNull(implementMidBasicStepCheckItemDisposeComReqDto.getStepNameCode(),"D3执行中基层部门步骤检查项状态处理(公共)-D3执行中基层步骤检查项处理(公共)-步骤编码不能为空",false);
      implementMidBasicStepCheckItemDisposeComRespDto = offStateService.implementMidBasicStepCheckItemDisposeCom(implementMidBasicStepCheckItemDisposeComReqDto)/*vcase invoke isSameApp*/;



           }

ImplementMidBasicDeptStepAndCheckItemStateDisposeComRespDto retData = new ImplementMidBasicDeptStepAndCheckItemStateDisposeComRespDto();





return retData;
  }
  //
}
